<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
    <include file="Inc/basic_css"/>
    <include file="Inc/basic_js"/>
    <import type="js" basepath="__JS__" file="AjaxFileUpload,imgpre,admin" />
    <import type="js" basepath="__PLUGIN__" file="ueditor.ueditor#config,ueditor.ueditor#all#min,ueditor.lang.zh-cn.zh-cn" />
    <link rel="stylesheet" type="text/css" href="__PLUGIN__/bootstrap-datepicker/css/datepicker.css" />
    <script type="text/javascript" src="__PLUGIN__/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed" onload="init();">
<!-- BEGIN HEADER -->
<include file="Inc/head"/>
<!-- END HEADER -->
<div class="clearfix"></div>
<!-- BEGIN CONTAINER -->
<div class="page-container">
    <!-- BEGIN SIDEBAR -->
    <include file="Inc/left"/>
    <!-- END SIDEBAR -->
    <!-- BEGIN PAGE -->
    <div class="page-content">

        <!-- BEGIN STYLE CUSTOMIZER -->
        <include file="Inc/theme"/>
        <!-- END BEGIN STYLE CUSTOMIZER -->
        <!-- BEGIN PAGE HEADER-->
        <div class="row">
            <div class="col-md-12">
                <!-- BEGIN PAGE TITLE & BREADCRUMB-->
                <h3 class="page-title">
                    {$cfg.title}<if condition="$dataInfo.id gt 0 ">修改信息<else />添加信息</if> <small></small>
                </h3>
                <ul class="page-breadcrumb breadcrumb">
                    <li><i class="fa fa-home"></i><a href="{:U('Index/index')}">首页</a> <i class="fa fa-angle-right"></i></li>
                    <li><a href="#">店铺管理员</a><i class="fa fa-angle-right"></i></li>
                    <li><a href="#">{$cfg.title}<if condition="$dataInfo.id gt 0 ">修改信息<else />添加信息</if></a><i class="fa fa-angle-right"></i></li>
                </ul>					<!-- END PAGE TITLE & BREADCRUMB-->
            </div>
        </div>
        <!-- END PAGE HEADER-->
        <!-- BEGIN PAGE CONTENT-->
        <div class="row">
            <div class="col-md-12">
                <!-- BEGIN EXAMPLE TABLE PORTLET-->
                <div class="portlet">
                    <!--
                    <div class="portlet-title">
                        <div class="caption">
                            <i class="fa fa-reorder"></i>站点信息
                        </div>
                    </div>-->
                    <form class="form-horizontal" action="{:U('RefundOrder/save')}"  id="submit_form" method="post">
                        <input type="hidden" name="id" value="{$dataInfo.id}" />
                        <input type="hidden" name="back_url" value="{$back_url}" />
                        <input type="hidden" name="status" id="status" value="">
                        <input type="hidden" name="order_detail_id" id="order_detail_id" value="{$dataInfo.order_detail_id}">

                        <div class="portlet-body form">
                            <!-- BEGIN FORM-->
                            <div class="form-body">
                                <div class="form-group">
                                    <label class="col-md-3 control-label">订单号：</label>
                                    <div class="col-md-4">
                                        <input type="text" class="form-control" readonly value="{$dataInfo["order_no"]}"/>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-md-3 control-label">退货订单号：</label>
                                    <div class="col-md-4">
                                        <input type="text" class="form-control" readonly value="{$dataInfo["refund_no"]}"/>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-md-3 control-label">货物状态：</label>
                                    <div class="col-md-4">
                                        <input type="text" class="form-control" readonly value="{:($dataInfo["cargo_status"])?'未收到':'已收到'}"/>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-md-3 control-label">退款原因：</label>
                                    <div class="col-md-4">
                                        <input type="text" class="form-control" readonly value=
                                        <switch name="dataInfo.cause">
                                            <case value="1">不想要了</case>
                                            <case value="2">快递未送达</case>
                                            <case value="3">空包裹</case>
                                            <case value="4">其他</case>
                                            <case value="5">不喜欢</case>
                                            <case value="6">商品与描述不符</case>
                                            <case value="7">型号/尺寸不正确</case>
                                            <case value="8">商品不全/缺件</case>
                                            <case value="9">其他</case>
                                        </switch>
                                        />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-md-3 control-label">退款详细原因：</label>
                                    <div class="col-md-4">
                                        <textarea readonly class="form-control">{$dataInfo.detail}</textarea>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-md-3 control-label">所属店铺：</label>
                                    <div class="col-md-4">
                                        <input type="text" class="form-control" readonly value="{$dataInfo.order_detail.store_title_cn}"/>
                                    </div>
                                </div>
                                <PHP>$pics=json_decode($dataInfo['pics']);</PHP>
                                <volist name="pics" key="key" id="item">
                                    <if condition ="$item">
                                    <div class="form-group">
                                        <label class="col-md-3 control-label">照片{$key}：</label>
                                        <div class="col-md-4">
                                            <img src="__UPLOAD__/{$item}" width="200"></div>
                                        </div>
                                    </div>
                                    </if>
                                </volist>
                            </div>
                        </div>
                        <div class="form-actions top fluid ">
                            <div class="col-md-offset-3 col-md-9">
                                <if condition="$dataInfo['status'] neq 3">
                                <button class="btn green" type="submit" onclick="$('#status').val('2')">审核通过</button>
                                <button class="btn blue" type="submit" onclick="$('#status').val('3')">直接退款</button>
                                <button class="btn red" type="submit" onclick="$('#status').val('4')">拒绝退款</button>
                                </if>
                                <button class="btn dark" type="button" id="cancel" onclick="windwos.location.href='{:U('RefundOrder/index')}'">返回</button>
                            </div>
                        </div>
                    </form>
                    <!-- END FORM-->



                </div>
            </div>
            <!-- END EXAMPLE TABLE PORTLET-->
        </div>
    </div>
    <!-- END PAGE CONTENT -->
</div>
<!-- END CONTAINER -->
<!-- BEGIN FOOTER -->
<include file="Inc/foot"/>
<!-- END FOOTER -->
<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->

<!-- END CORE PLUGINS -->
<!-- BEGIN PAGE LEVEL SCRIPTS -->
<script src="__JS__/app.js" type="text/javascript"></script>
<script src="__JS__/form-components.js"></script>
<script src="__JS__/controllers/refund_order/edit.js" type="text/javascript"></script>

<!-- END PAGE LEVEL SCRIPTS -->
<script>
    jQuery(document).ready(function() {
        App.init(); // initlayout and core plugins
        NewValidation.init();
        FormComponents.init();
    });
</script>
</body>
<!-- END BODY -->
</html>